﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;

namespace EnCor.Hosting.WSHosting
{
    [Serializable]
    public class WebServiceMapCollection :ReadOnlyCollection<WebServiceMapItem>
    {

        public WebServiceMapCollection(IList<WebServiceMapItem> map):base(map)
        { 
            
        }

        public Type GetWebServiceType(string actionUrl)
        {
            foreach (var item in this)
            {
                if (item.SoapAction == actionUrl)
                {
                    return item.WebServiceType;
                }
            }
            return null;
        }
    }
}
